//
//  UIColor+Extension.swift
//  Douyu_Swift
//
//  Created by Albert Zhu on 16/11/1.
//  Copyright © 2016年 Albert Zhu. All rights reserved.
//

import UIKit

extension UIColor {
    class var randomColor: UIColor {
        return UIColor(red: CGFloat(arc4random() % 256) / 255.0, green: CGFloat(arc4random() % 256) / 255.0, blue: CGFloat(arc4random() % 256) / 255.0, alpha: 1.0)
    }
    
    convenience init(az_color_red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat = 1) {
        
        self.init(red: az_color_red / 255.0, green: green / 255.0, blue: blue / 255.0, alpha: alpha)
    }
}
